/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package wwcontrolserver.controls;

import java.io.Serializable;

/**
 *
 * @author Michael Ferry
 */
public abstract class AbstractControlState implements Serializable{
    protected final int ControlID;
    protected final String ControlName;
    protected final boolean NotifyUsingCentralTimer;
    private static final long serialVersionUID = -1808449448310405670L;
    
    public AbstractControlState(int ControlID, String ControlName, boolean CentralTimerNotificationState){
        this.ControlID = ControlID;
        this.ControlName = ControlName;
        this.NotifyUsingCentralTimer = CentralTimerNotificationState;
    }
    public int GetControlID(){
        return ControlID;
    }
    protected String GetControlName(){
        return ControlName;
    }

    protected boolean GetCentralTimerNotificationState(){
        return NotifyUsingCentralTimer;
    }
    //Note this function should check to make sure that DesiredState is a instance of its state
    protected abstract void UpdateControlState(AbstractControlState DesiredState) throws Exception;
    protected abstract void SetOffState();
}
